<?php

namespace App\Http\Requests\Common\Captcha;
use App\Http\Requests\Request;


class MobileSmsRequest extends Request {
    public function authorize(){
        return true;
    }
    public function rules(){
        return [
            'mobile'=>'required|mobile_verification',
            'mcode'=>'required|mobile_verification_code:'.$this->mobile
        ];
    }
    public function messages(){
        return [
            'mobile.required'=>'手机号码不能为空',
            'mobile.mobile_verification'=>'请输入正确的手机号码',
            'mcode.required'=>'验证码不能为空',
            'mcode.mobile_verification_code'=>'手机号码和验证号码不匹配！'
        ];
    }
}